<!doctype html>
<html lang="{{ app()->getLocale() }}">
<head>
<script>
  function gotoShop(corpId){
	   	  document.getElementById('corp_id').value=corpId;
          var form = document.getElementById('userForm');
          form.action="goto_home";
	  form.method ="get";
          form.submit();
      }
  </script>
</head>
@extends('layouts.admin_common')
@section('content')

<div class="breadcrumbs_container">
	{{Breadcrumbs::render('admin.select_corp') }}</div>
<div class="system_tab_line"></div>

<body>
	<div id="outDiv">
			<table class="table table-condensed">
				<tr>
					<td>会社名</td>
					<td>会社名カナ</td>
					<td>郵便番号</td>
					<td>会社TEL</td>
					<td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
				</tr>
				<tr>@foreach ($corpInfos as $corpInfo)
				<tr>
					<td>{{$corpInfo->corp_name}}</td>
					<td>{{$corpInfo->corp_catelogue}}</td>
					<td>{{$corpInfo->corp_postcode}}</td>
					<td>{{$corpInfo->corp_tel}}</td>
					<td><input type="button" value="選択"
						class="btn btn-primary button_normal"
						onclick="gotoShop('{{$corpInfo->corp_id}}')" /></td>
				</tr>
				@endforeach
			</table>
			<form class="form-inline" id="userForm" method="get" >
			<div>@if(isset($success)) {{$success}} @endif</div>
		    <div>@if(isset($error)) {{$error}} @endif</div>
			<input type="hidden" id="corp_id" name="corp_id">
			<input type="hidden" name="_token" value="{{csrf_token()}}">
		</form>
	</div>
</body>
</html>
@endsection
